package com.baaio.util;


/**
 * 获得数据库连接信息类
 *
 */
public class GetInfo
{
	private String Host;
	private String Port;
	private String Db;
	private String Root;
	private String Pwd;
	private String SqlORmysql;
	private String Print;
	private static GetInfo getInfo;
	
	
	private GetInfo()
	{
		/**
		List<String> list = XMLGetData.getRoot(GetConfig.path(), "*");
		this.setHost(list.get(0));
		this.setPort(list.get(1));
		this.setDb(list.get(2));
		this.setRoot(list.get(3));
		this.setPwd(list.get(4));
		this.setSqlORmysql(list.get(5));
		this.setPrint(list.get(6));
		
	    this.setHost("qdm-030.hichina.com");
	    this.setPort("3306");
	    this.setDb("qdm0300284_db");
	    this.setRoot("qdm0300284");
	    this.setPwd("abaov1234566");
	    this.setSqlORmysql("mysql");
	    this.setPrint("true");
	    **/
	    
	    
	    
	    this.setHost(DBItemGet.getProperty("Host"));
	    this.setPort(DBItemGet.getProperty("Port"));
	    this.setDb(DBItemGet.getProperty("Db"));
	    this.setRoot(DBItemGet.getProperty("Root"));
	    this.setPwd(DBItemGet.getProperty("Pwd"));
	    this.setSqlORmysql(DBItemGet.getProperty("SqlORmysql"));
	    this.setPrint(DBItemGet.getProperty("Print"));
	    
	    
	    
	    
	    
	}
	
	
	public static GetInfo getInstance()
	{
		if(getInfo == null)
		{
			getInfo = new GetInfo();
		}
		return getInfo;
	}
	

	public String getHost()
	{
	
		return Host;
	}


	
	private void setHost(String host)
	{
	
		Host = host;
	}


	
	public String getPort()
	{
	
		return Port;
	}


	
	private void setPort(String port)
	{
	
		Port = port;
	}


	
	public String getDb()
	{
	
		return Db;
	}


	
	private void setDb(String db)
	{
	
		Db = db;
	}


	
	public String getRoot()
	{
	
		return Root;
	}


	
	private void setRoot(String root)
	{
	
		Root = root;
	}


	
	public String getPwd()
	{
	
		return Pwd;
	}


	
	private void setPwd(String pwd)
	{
	
		Pwd = pwd;
	}


	
	public String getSqlORmysql()
	{
	
		return SqlORmysql;
	}


	
	private void setSqlORmysql(String sqlORmysql)
	{
	
		SqlORmysql = sqlORmysql;
	}


	
	public String getPrint()
	{
	
		return Print;
	}


	
	private void setPrint(String print)
	{
	
		Print = print;
	}
	
	

}

